import java.util.Vector;


public class RNAFamily {
	private String name;
	private Vector<RNASpecies> species;
	
	public RNAFamily(String name, Vector<RNASpecies> species) {
		super();
		this.name = name;
		this.species = new Vector<RNASpecies>();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean add(RNASpecies e) {
		return species.add(e);
	}
	
	// Ajout d'une structure a une espece 
	public boolean addToSpecies(String nameSpecies, RNASecondaryStructure rst)
	{
		for(int i=0; i < species.size(); i++)
		{
			if(nameSpecies.compareTo(get(i).getName()) == 0)
			{
				return get(i).add(rst);
			}
		}
		return false;
	}

	public RNASpecies get(int index) {
		return species.get(index);
	}

	public RNASpecies remove(int index) {
		return species.remove(index);
	}

	public int size() {
		return species.size();
	}

	
	
	

	
	
}
